console.log('The tick');
const a = () => new Promise((resolve) => {
  setTimeout(() => {
    console.log('A resolved');
    resolve(999);
  }, 3000);
});
new Promise((resolve) => {
  console.log('get A promise');
  resolve(a());
}).then((data) => {
  console.info('Maybe next tick');
  console.log(data);
});
